#最长不重复子串
def repting(s):
    left,right = 0,0
    maxlen = -1
    dic = {}
    while right<len(s):
        if s[right] in dic:
            left = dic[s[right]]
        dic[s[right]] = right
        maxlen = max(maxlen,right-left)
        right += 1
    return maxlen
print(repting("abcabcdd"))#
print(repting("bbbb"))#
print(repting("bwwkew"))#
